<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta name="copyright" content="www.apicloud.com" />
<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
<title>修改密码</title>
<link rel="stylesheet" type="text/css" href="../css/api.css" />
<style>
	html {height: 100%;}
	body {height: 100%;width:100%;background-image:url(../image/login/yqdlbj.png);}
	
	input {height: 50px;font-size: 18px;color: #8E8C8C;width: 80%;}
	input::-webkit-input-placeholder {color: #ccc;}
	.clear_10{ width: 100%; height:10px;}
	.clear_20{ width: 100%; height:20px;}
	.top_logo{ width:90%; margin:0 5%;}
	.main_logo{ width:60%; margin:0 20%;}
	.divider {height: 15px;}
	.email,.passwd {/*margin-top: 3px;*/background: #fff;}
	.passwd img, .email img {vertical-align: top;}
	.item { width:90%; margin:0 5%;position: relative;}
	.email{-webkit-border-radius: 5px 5px 0px 0px;  border: 1px solid #B8B8B8;}
	.passwd1{ border-right: 1px solid #B8B8B8;border-left: 1px solid #B8B8B8; border-bottom: 1px solid #B8B8B8;}
	.passwd{-webkit-border-radius: 0px 0px 5px 5px; border-right: 1px solid #B8B8B8;border-left: 1px solid #B8B8B8; border-bottom: 1px solid #B8B8B8;}
	/*.email, .passwd, .btn {margin:3px 10px;}*/
	.btn {margin:3px 10px;}
	.btn {background: red;color: #fff;height: 40px; text-align: center; line-height: 40px; font-size: 20px;margin-top: 20px;border-radius: 5px;}
 	.email img {width: 25px; margin-top: 15px; margin-left: 10px; margin-right: 9px;}
	.passwd img {height: 25px;margin-top: 10px; margin-left: 10px;margin-right: 10px;}
	.passwd1 img {height: 25px;margin-top: 10px; margin-left: 10px;margin-right: 10px;}
	.secretword img {height: 25px;margin-top: 10px; margin-left: 10px;margin-right: 10px;}

	/* 底部样式 */
	.bottom {/*position: absolute;bottom: 0;*/width: 100%; text-align: center;/*padding-bottom: 20px;*/font-size: 12px;}
	.bottom img {height: 50px;}
	.bottom .arrow {text-align: center;margin: 10px 0;}
	.bottom .arrow img {width: 40px;height: 20px;}
	#qqpic {margin-right: 10px; margin-left: 10px;}
	.thirdinfo {color: #666;margin-top: 10px;}

	.secretword input {width: 50%;}
	.secretimg {position: absolute; right: 0; top: 0; height: 56px; margin-right: 10px; border-left: 1px solid #e0e0e0;}
	.secretimg img {height: 60%;}
     
    .thirdcompy>span {line-height: 40px;color: #999999; font-size: 1.2em;}
    .thirdcompy>span>a{line-height: 40px;color: blue; font-size: 1.2em;}
	.thirdcompy>span>a:hover{color: #999999;}
	.loginmore {margin-top: 10px;}
	.loginmore span {color: #0078ff;}
	.loginmore .forget {margin-left: 10px;}
	.loginmore .phone {margin-right: 10px;float: right;}

	.btnhover {background-color: #dcdcdc !important;}
	.buyhover {background-color: rgba(252, 85, 0, 0.6) !important;}
	.presshover {background-color: #FAFAFA !important;}
	.txthover {color: rgba(0, 120, 255, 0.6) !important;}
	input {outline: none;}
</style>
</head>
<body>
	<div class="divider"></div>
	
	<div class="form" >
		<div class="clear_20"></div>
		<div class="clear_20"></div>
		<div class="item email"><img src="../image/admin/password.png" alt=""><input name="old_password" type="text" placeholder="输入旧密码" id="old_password"></div>
		<div class="item passwd1"><img src="../image/admin/password.png" alt=""><input name="new_password" type="password" placeholder="输入新密码" id="new_password"></div>
		<div class="item passwd"><img src="../image/admin/password.png" alt=""><input name="new_password2" type="password" placeholder="确认新密码" id="new_password2"></div>
		
		 <div class="clear_20"></div>
		<div class="clear_20"></div>
		<div class="btn" tapmode="buyhover" onclick="checkform()">确  定</div>
		
	</div>
	<div class="loginmore">
		<span class="forget" tapmode="txthover" onclick=""></span>
		<span class="phone" tapmode="txthover" onclick=""></span>
	</div>
	<div class="divider" id="bottomdivider"></div>	 
	<input id="access_token" type="hidden" value=""/>
    <input id="admin_id" type="hidden" value=""/>
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/api.data.js"></script>
<script type="text/javascript" src="../script/jquery.md5.js"></script>
<script type="text/javascript" src="../script/jquery.min.js"></script>
<script type="text/javascript">
   apiready = function() {  
          //获取头部和底部的相关信息，计算子窗口的高度及y坐标
          header = $api.byId('header');       
          $api.fixIos7Bar(header);     
          headerOffset = $api.offset(header);
                
         get_sign();  
    	// 可以运行，但是会有明显卡顿
    	var formHeight = $api.dom('.form').offsetHeight;
    	var loginmore = $api.dom('.loginmore').offsetHeight;

    	headerHeight = api.pageParam.name;       
    	var bottomdivider = $api.dom('#bottomdivider');
    	bottomdivider.style.height = api.frameHeight  - formHeight - loginmore - 43 + 'px';
    };
    
    
	//判断登陆
	function checkform() {
	    
	    //获取验证信息
		var old_password = document.getElementById("old_password").value;
		var new_password = document.getElementById("new_password").value;	
		var new_password2 = document.getElementById("new_password2").value;
		if(new_password != new_password2){
		     api.alert({msg:"两次输入的新密码不一致，请重新输入"});
		}else{	 
 		     change_password(old_password,new_password);
	    }
	}

</script>
</html>